old_player_count = 0
new_player_count = 0
hunt_with_half = 0
dead_person = 0

def hunt_choices(round_number, current_food, current_reputation, m, player_reputations):
    global dead_person
    global hunt_with_half
    hunt_decisions = list()
    if round_number == 1:
		for reputation in player_reputations:
			hunt_decisions.append('h')#Establish a good reputation in round 1
    elif round_number == 2:
	hunt_with_half = (new_player_count/2)+2#This will give me a reputation of just over 0.75 which I believe will put me just above the median.
	for reputation in player_reputations:
		if hunt_with_half > 0:#There is no point in hunting with anyone who just slacked in round 1
			hunt_decisions.append('h')
			hunt_with_half -= 1#Using this means that just over the first half of the people in the list will be hunted with and those with bad reputations will be skipped but that the same nuber of people will be hunted with no matter the order.
		else:
			hunt_decisions.append('s')
    else:
		number_to_help = 0
		for reputation in player_reputations:
			if reputation >= current_reputation:
				number_to_help +=1
		for reputation in player_reputations:
			if number_to_help > 0:
				hunt_decisions.append('h')
			else:
				hunt_decisions.append('s')
    return hunt_decisions

def hunt_outcomes(food_earnings):
	global dead_person								#This section sets up a trigger that will go when someone dies for the first time
	global old_player_count							#I think this will be the only measurable sign that the game is entering it's late stages
	global new_player_count							#Once it triggers I will only slack but because of the large number of round I expect this to take
	if dead_person == 0								#My reputation will appear unchanged for quite a long time
		old_player_count = new_player_count
		new_player_count = 0
		for x in food_earnings:
				new_player_count +=1
		if old_player_count != new_player_count:
			dead_person=1

def round_end(award, m, number_hunters):
    pass # do nothing

